<%@ page language="java" contentType="text/html; charset=ISO-8859-1"
	pageEncoding="ISO-8859-1"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/sql" prefix="sql"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<sql:setDataSource driver="com.mysql.jdbc.Driver"
	url="jdbc:mysql://localhost:3306/bookstore" user="bkadmin"
	password="nozama" />
	<c:set var="bookid" value='<%= request.getParameter("bookId") %>'></c:set>
	<sql:query var="book" sql="SELECT * FROM BOOKS WHERE BOOK_ID=?">
		<sql:param value="${bookid}" />
	</sql:query>
	
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<title><%=request.getParameter("bookName")%></title>
</head>
<body>
	<h3><%=request.getParameter("bookName")%></h3>
	<c:forEach var="row" items="${book.rows}">
	<b>Author : <c:out value="${row.book_author}"/></b><br/>
	<br/>
	Price : <c:out value="${row.book_price}" />
	Category : <c:out value="${row.book_category}"></c:out>
	</c:forEach>
	<a href="buy?bookId=${bookid}">Buy!</a>
</body>
</html>